package yf.asserts;

public class ResponseAssert {
    public static StringBuffer verfiyResult(String expResult,String actulResult){
        if (expResult.equals("") || expResult == null)
            return null;
        boolean assertFlag = true;
        StringBuffer stringBuffer = new StringBuffer();
        assertFlag = ContainAssert.contains(actulResult, expResult);
        if (!assertFlag)
            stringBuffer.append("【" + "断言" + assertFlag + String.format("，期待\n'%s'\n包含'%s'，实际不包含！】\n", actulResult, expResult));
        else
            stringBuffer.append("【"  + "断言" + assertFlag + String.format("，期待\n'%s'\n包含'%s'，实际包含！】\n", actulResult, expResult));
        return stringBuffer;
    }

}
